{if !$tree}
	{assign var='tree' value=$plugin.sitemenu}
{/if}
<ul id="topnav">

	{foreach from=$tree item=k name=treeBuilding}
		{if $plugin.currentPageId==$k.page_id}
			<li><span>{$k.menuTitle}</span></li> 
		{else}
			<li><a href="/{$k.filename}/">{$k.menuTitle}</a></li>
		{/if}
				{if $k.sub}
					{assign var='tree' value=$k.sub}
					{include file="menu/up.tpl"}
				{/if}
	{/foreach}
</ul>